class TpshopLoginApi:

    # 封装发送验证码接口
    @classmethod
    def verify_code_api(cls, session):
        session.get("http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=verify")

    @classmethod
    def login_api(cls, body, session):
        # 发送登录接口
        url = "http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=do_login"
        header = {"Content-Type": "application/x-www-form-urlencoded"}
        resp = session.post(url=url, headers=header, data=body)
        return resp
